#include <iostream>
#include <cstring>
#include <memory>

using namespace std;

int main()
{

	std::shared_ptr<int> p1;
	p1.reset(new int(1));
	std::shared_ptr<int> p2 = p1;
	// 引用计数此时应该是2
	cout << "p2.use_count() = " << p2.use_count() << endl;
	p1.reset();
	cout << "p1.reset()\n";
}